package com.livesource.server.github;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.livesource.client.webservices.github.GithubAPIService;

public class GithubAPIServiceImpl extends RemoteServiceServlet implements
		GithubAPIService {

	private static final long serialVersionUID = -8355612980477933670L;

	public String githubListFiles(final String authenticationToken,
			final String repositoryName) {

		String jsonString = GithubAPI.listSourceFiles(authenticationToken,
				repositoryName);

		return jsonString;
	}

	public String githubGetFile(final String authenticationToken,
			final String repositoryName, final String fileExtension,
			final String sha) {

		String jsonString = LiveSourceAPI.getFile(authenticationToken,
				repositoryName, fileExtension, sha);

		return jsonString;
	}
}
